<form id="add-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Position_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-position_id" data-rule="required" data-source="ad/position/index" data-primary-key="position_id" data-field="position_name" class="form-control selectpage" name="row[position_id]" type="text" value="">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Ad_name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-ad_name" data-rule="required" class="form-control" name="row[ad_name]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Ad_file')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-ad_file" data-rule="required" class="form-control" size="50" name="row[ad_file]" type="text">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="plupload-ad_file" class="btn btn-danger plupload" data-multipart={"module":"h/imgs","nocrop":"1"} data-input-id="c-ad_file" data-mimetype="image/jpeg,image/png,image/jpg" data-multiple="true" data-preview-id="p-ad_file"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-ad_file"></span>
            </div>
            <ul class="row list-inline plupload-preview" id="p-ad_file"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Ad_link')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-ad_link" data-rule="required" class="form-control" name="row[ad_link]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Start_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-start_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[start_time]" type="text" value="{:date('Y-m-d H:i:s')}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('End_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-end_time" data-rule="required" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[end_time]" type="text" value="{:date('Y-m-d H:i:s')}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Link_man')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-link_man" class="form-control" name="row[link_man]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Link_phone')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-link_phone" class="form-control" name="row[link_phone]" type="text">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Format')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
                {foreach name="formatList" item="vo"}
                <label for="row[format]-{$key}"><input id="row[format]-{$key}" name="row[format]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}</label>
                {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">

            <div class="radio">
            {foreach name="statusList" item="vo"}
            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="1"}checked{/in} /> {$vo}</label>
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Weigh')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-weigh" class="form-control" name="row[weigh]" type="number" value="0">
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-admin_id" class="form-control" name="row[admin_id]" type="hidden" value="{:$auth->id}">
            <button type="submit" class="btn btn-success btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
